<?php /* Smarty version Smarty-3.1.15, created on 2018-11-20 17:54:38
         compiled from "D:\project\classic_games\view\admin\games\setting.php" */ ?>
<?php /*%%SmartyHeaderCode:100775bf3d9de015ea1-32716821%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '4537c2a656a2249a36fd7336fb84a9479244c0ef' => 
    array (
      0 => 'D:\\project\\classic_games\\view\\admin\\games\\setting.php',
      1 => 1542620022,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '100775bf3d9de015ea1-32716821',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'check_we_app' => 0,
    'URL' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.15',
  'unifunc' => 'content_5bf3d9de088511_09121939',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5bf3d9de088511_09121939')) {function content_5bf3d9de088511_09121939($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ('../common_admin/left_bar.php', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<form enctype="multipart/form-data"  method="post">
    <div style="padding: 10px;">
        <h2>经典游戏设置</h2>

        <div class="table_main">
            <table class="tb tb2 nobdb">
                <tbody>
                <tr class="noborder">
                    <td class="td_l">小程序开关:</td>
                    <td class="vtop rowform">
                        <input class="radio" type="radio" name="check_we_app" value="1" <?php if (1==$_smarty_tpl->tpl_vars['check_we_app']->value) {?>checked="checked"<?php }?>>
                        &nbsp;开
                        <input class="radio" type="radio" name="check_we_app" value="0" <?php if (0==$_smarty_tpl->tpl_vars['check_we_app']->value) {?>checked="checked"<?php }?>>
                        &nbsp;关
                    </td>
                    <td class="vtop tips2">小程序是否打开，如果是关，则进入提问界面，如果是开，则进入拼多多商品推广首页</td>
                </tr>

                <tr>
                    <td>&nbsp;</td>
                    <td colspan="2">
                        <div class="fixsel">
                            <input type="button" class="btn submit_btn" value="提交" onclick="go_submit()">
                        </div>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
    <script type="text/javascript">
        function go_submit() {
            var check_we_app = $('input:radio[name="check_we_app"]:checked').val();
            if (null == check_we_app) {
                alert("什么也没有选中");
                return;
            }

            $.ajax({
                url: '<?php echo $_smarty_tpl->tpl_vars['URL']->value;?>
m=games&a=setting_save',
                data: {
                    'check_we_app': check_we_app
                },
                type: 'post',
                dataType: 'json',
                success: function (data) {
                    if (data.r == 0) {
                        alert('修改成功!');

                        location.href = '<?php echo $_smarty_tpl->tpl_vars['URL']->value;?>
m=games&a=setting';
                    } else {
                        alert('修改失败!');
                    }
                },
                error: function () {
                    alert('修改失败!');
                }
            });
        }
    </script>
</form>
<?php echo $_smarty_tpl->getSubTemplate ('../common_admin/right_bar.php', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
<?php }} ?>
